package com.xu.test;

import com.xu.data.source.DataAccess;
import com.xu.model.Department;
import com.xu.model.User;
import com.xu.service.IDepartment;
import com.xu.service.IUser;
import org.junit.Test;

/**
 *
 * @author xudenghui
 * @create 2023-08-01 10:18
 **/
public class Moder3 {


    /**
     * 直接得到实际的数据库访问实例，而不需要任务依赖
     */
    @Test
    public void test1(){
        User user = new User();
        Department department = new Department();

        IUser user1 = DataAccess.createUser();
        user1.insert(user);
        user1.getUser(1);


        IDepartment department1 = DataAccess.createDepartment();
        department1.insert(department);
        department1.getDepartment(2);
    }


}
